package com.zf.yichat.vo;

/**
 * 一句话描述功能
 *
 * @author fengsong
 * @date create in 16:45 2019/6/10 2019
 */
public enum BalanceType {

    NULL(-1, "空", ""),
    /**
     * 客户端余额充值
     */
    ADD(0, "余额充值", "+"),
    /**
     * 客户端会员充值
     */
    VIP_ADD(32, "积分充值", "+"),

    // 积分兑换余额
    INTEGRAL_EXCHANGE_BALANCE(321, "积分兑换余额", "+"),
    /**
     * 会员领取红包
     */
    VIP_PACKET_RECEIVE(33, "领取红包", "+"),
    /**
     * 提现
     */
    WITHDRAW(1, "提现成功", "-"),
    /**
     * 提现
     */
    WITHDRAW_TRANS(40, "提现成功-转账", "-"),
    /**
     * 创建红包
     */
    CREATE_PACKET(2, "余额创建红包", "-"),
    /**
     * 盲盒
     */
    CREATE_PACKET_MANGHE(41, "购买盲盒", "-"),
    /**
     * 用户开通初级合伙人
     */
    USER_OPENS_MEMBERSHIP(42, "用户开通铜耀合伙人", "-"),
    /**
     * 用户开通中级合伙人
     */
    USER_OPENS_MEMBERSHIP_INTERMEDIATE(47, "用户开通中级合伙人", "-"),
    /**
     * 用户开通高级合伙人
     */
    USER_OPENS_MEMBERSHIP_SUPREME(43, "用户开通银耀合伙人", "-"),
    /**
     * 用户开通终级合伙人
     */
    USER_OPENS_MEMBERSHIP_ULTIMATE(44, "用户开通金耀合伙人", "-"),
    /**
     * 用户开通终级合伙人
     */
    USER_OPENS_MEMBERSHIP_STARLIGHT(48, "用户开通星耀会员", "-"),

    /**
     * 用户购买门票
     */
    USERS_PURCHASE_TICKETS(100, "用户购买门票", "-"),
    /**
     * 用户出售门票
     */
    USERS_SELLING_TICKETS(101, "用户出售门票", "+"),
    /**
     * 用户支付商城订单
     */
    USER_PAYMENT_MALL_ORDER(45, "用户支付商城订单", "-"),

    /**
     * 用户兑换积分商城商品
     */
    USER_EXCHANGE_MALL_GOODS(46, "用户兑换积分商城商品", "-"),
    /**
     * 领取红包
     */
     RECEIVE_PACKET(3, "领取红包", "+"),

    /**
     * 扣除发红包人的冻结
     */
    RECEIVE_PACKET_CREATOR(4, "扣除红包冻结余额", "-"),

    /**
     * 扣除发红包人的冻结
     */
    RETURN_PACKET(5, "红包退回", "+"),

    /**
     * 签到获取
     */
    SIGN(6, "签到", "+"),
    /**
     * 后台直接充值
     */
    BACK_ADD(7, "系统充值", "+"),
    /**
     * 后台直接提现
     */
    BACK_WITHDRAW(8, "系统提现", "-"),

    /**
     * 红包充值  --已停用
     */
    PACKET_ADD(9, "红包充值", "+"),
    /**
     * 微信创建红包
     */
    WEIXIN_CREATE_PACKET(10, "微信充值创建红包", ""),
    /**
     * 微信创建红包
     */
    ALIPAY_CREATE_PACKET(11, "支付宝充值创建红包", ""),

    /**
     * 提现申请
     */
    WITHDRAW_APPLY(12, "提现申请", "-"),

    /**
     * 提现失败
     */
    WITHDRAW_FAIL(13, "提现失败", "+"),

    /**
     * 营销返利-待审核
     */
    PACKET_SALE_CHECK(14, "创建营销返利", "-"),
    /**
     * 创建米选-待审核
     */
    PACKET_MIXUAN_CHECK(34, "创建米选", "-"),
    /**
     * 创建营销返利-审核通过
     */
    PACKET_SALE_CREATE(26, "创建营销返利-已创建", "-"),
    /**
     * 创建营销返利-审核通过
     */
    PACKET_MIXUAN_CREATE(35, "创建米选-已创建", "-"),
    /**
     * 创建营销返利-审核未通过，返还
     */
    PACKET_SALE_BACK(27, "创建营销返利-审核退回", "+"),
    /**
     * 创建营销返利-审核未通过，返还
     */
    PACKET_MIXUAN_BACK(36, "创建米选-审核退回", "+"),
    PACKET_MIXUAN_TERMINATE_BACK(37, "米选撤销", "-"),
    /**
     * 取消营销返利返回剩余金额
     */
    PACKET_SALE_TERMINATE_BACK(28, "营销返利取消", "-"),

    /**
     * 领取营销返利（需要审核）
     */
    PACKET_SALE_GET_CHECK(29, "领取商品返利", "+"),
    /**
     * 领取营销返利（审核通过）
     */
    PACKET_SALE_GET_SUCCESS(30, "领取商品返利", "+"),
    /**
     * 领取淘宝客/京东返利（审核通过）
     */
    PACKET_FANLI_GET(31, "领取商品返利", "+"),
    /**
     * 领取淘宝客/京东返利（审核通过）
     */
    PACKET_FANLI_INVITE_GET(39, "下级用户返利分成", "+"),
    /**
     * 领取营销返利
     */
    PACKET_SALE_GET(15, "领取营销返利", "+"),

    PACKET_SALE_GET_FREEZE(16, "领取营销返利", "+"),

    PACKET_SALE_GET_FREEZE_NOT(17, "营销返利可提现", "+"),

    PACKET_SALE_GET_FREEZE_USER_END(18, "营销返利退群扣除", "-"),

    PACKET_SALE_GET_FREEZE_OWNER_END(19, "营销返利用户退群返还", "+"),

    MISSION(20, "发布任务", "-"),

    MISSION_COMMISSION(21, "发布任务佣金", "-"),

    MISSION_COMPLETE(22, "完成任务获取金额", "+"),

    MISSION_COMPLETE_WITHDRAW(23, "完成任务提现", "+"),

    MISSION_COMMISSION_REFUSE(24, "任务审核拒绝返还佣金", "+"),

    MISSION_REFUSE(25, "任务审核拒绝返还", "+"),

    /**
     * 观看视频奖励
     */
    VIDEO_PLAY(110, "观看视频奖励", "+"),

    /**
     * 观看视频奖励
     */
    VIDEO_COMMENT(111, "评论视频奖励", "+"),

    VIDEO_PUBLISH(113, "发布视频奖励", "+"),

    VIDEO_PUBLISH_DELETE(114, "视频审核不通过扣除", "-"),
    VIDEO_PRAISE(115, "点赞视频奖励", "+"),
    VIDEO_PACKET(116, "领取视频红包", "+"),

    /**
     * 邀请奖励
     */
    USER_INVITE(210, "邀请用户奖励", "+");

    BalanceType(Integer val, String desc, String direct) {
        this.val = val;
        this.desc = desc;
        this.direct = direct;
    }

    private int val;
    private String desc;
    //对可提现余额造成的加减
    private String direct;

    public String getDirect() {
        return direct;
    }

    public void setDirect(String direct) {
        this.direct = direct;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public int getVal() {
        return val;
    }

    public void setVal(int val) {
        this.val = val;
    }

    public static BalanceType valOf(Integer type) {

        for (BalanceType b : BalanceType.values()) {
            if (b.getVal() == type) {
                return b;
            }
        }

        return BalanceType.NULL;

    }
}
